package com.banhujiu.lakalaPlugin.entities;


import com.banhujiu.lakalaPlugin.enums.LklReturnCodeEnum;

/**
 * @author 刘博文
 * @date 2017/4/10 0010 12:31
 */
public class LklResult {
	private String return_code;

	private String return_msg;

	public String getReturn_code() {
		return return_code;
	}

	public void setReturn_code(String return_code) {
		this.return_code = return_code;
	}

	public String getReturn_msg() {
		return return_msg;
	}

	public void setReturn_msg(String return_msg) {
		this.return_msg = return_msg;
	}

	public static LklResult fail(String returnMsg) {
		LklResult result = new LklResult();
		result.setReturn_code(LklReturnCodeEnum.FAIL.getCode());
		result.setReturn_msg(returnMsg);
		return result;
	}

	public static LklResult success() {
		return success("OK");
	}

	public static LklResult success(String msg) {
		LklResult result = new LklResult();
		result.setReturn_code(LklReturnCodeEnum.SUCCESS.getCode());
		result.setReturn_msg(msg);
		return result;
	}
}
